/*
 * @Author: wangc
 * @Date: 2020-08-09 18:17:58
 * @LastEditTime: 2020-08-22 11:43:42
 * @Description: 
 */
package com.example.util;
/**
 * 定义一个枚举类来维护我们的状态码,只包含code和msg
 */
public enum RespCode {

    SUCCESS(200, "请求成功"),
    WARN(-1, "网络异常，请稍后重试"),
    TOKENERROR(401,"token失效"),
    LOGINERROR(402,"账号密码错误");
    private int code;
    private String msg;

    RespCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }
    public String getMsg() {
        return this.msg;
    }
}